/**
 * router for main app
 */
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { DashboardComponent } from './pages/dashboard/component.dashboard';
import { LayoutComponent } from './pages/layout/component.layout';
import { PanelComponentDemo } from './pages/panel/component.panel';

export const routes: Routes = [{
    path: 'dashboard',
    component: DashboardComponent
}, {
    path: 'forms',
    loadChildren: './pages/forms/module.forms#FormsModule'
}, {
    path: 'layout',
    component: LayoutComponent
}, {
    path: 'panel',
    component: PanelComponentDemo
}, {
    path: '',
    redirectTo: '/dashboard',
    pathMatch: 'full'
}, {
    path: '**',
    component: DashboardComponent
}];

@NgModule({
    imports: [
        RouterModule.forRoot(routes, { useHash: true })
    ],
    exports: [
        RouterModule
    ]
})
export class AppRouter {

}